
{include file="public/layout" /}
<link rel='stylesheet' href='/static/admin/css/other/console.css?v="+localStorage.getItem("version")+"'>
<body class="laytp-container" style="display:none;">
<div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-xs6 layui-col-md3">
            <div class="layui-card top-panel">
                <div class="layui-card-header">订单数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;">
                            今日订单：<span id="today_order_num">{$rdata['today_order_num']}</span>
                        </div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips">
                            昨日订单：<span id="yesterday_order_num">{$rdata['yesterday_order_num']}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md3">
            <div class="layui-card top-panel">
                <div class="layui-card-header">收款金额</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" >
                            今日收款：<span id="today_order_money">{$rdata['today_order_money']}</span>
                        </div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips">
                            昨日收款：<span id="yesterday_order_money">{$rdata['today_order_money']}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md3">
            <div class="layui-card top-panel">
                <div class="layui-card-header">商品数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;">
                            今日新增：<span id="today_product_num">{$rdata['today_product_num']}</span>
                        </div>
                        <div class="layui-col-xs4 layui-col-md4  top-panel-tips">
                            累计商品：<span id="total_product_num">{$rdata['total_product_num']}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md3">
            <div class="layui-card top-panel">
                <div class="layui-card-header">会员数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;">
                            今日新增：<span id="today_user_num">{$rdata['today_user_num']}</span>
                        </div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips">
                            昨日新增：<span id="yesterday_user_num">{$rdata['yesterday_user_num']}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md9">
            <div class="layui-card">
                <div class="layui-card-header">数据统计</div>
                <div class="layui-card-body">
                    <div class="layui-tab custom-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <div id="echarts-records" style="background-color:#ffffff;min-height:400px;padding: 10px"></div>
<!--                        <div>收款金额</div>-->
                    </div>
                </div>
            </div>
<!--            <div class="layui-card">-->
<!--                <div class="layui-card-header">动态</div>-->
<!--                <div class="layui-card-body">-->
<!--                    <dl class="layuiadmin-card-status">-->
<!--                        <dd>-->
<!--                            <div class="layui-status-img">-->
<!--                                <a href="javascript:;">-->
<!--                                    <img style="width: 32px;height: 32px;border-radius: 50px;" src="/static/admin/images/avatar.jpg">-->
<!--                                </a>-->
<!--                            </div>-->
<!--                            <div>-->
<!--                                <p>七彩枫叶 在 <a class="laytp-text" lay-href="https://gitee.com/Jmysy/laytp-Admin-Layui">laytp Admin 专区</a> 回答问题</p>-->
<!--                                <span>几秒前</span>-->
<!--                            </div>-->
<!--                        </dd>-->
<!--                    </dl>-->
<!--                </div>-->
<!--            </div>-->
        </div>
        <div class="layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">最近更新</div>
                <div class="layui-card-body">
                    <ul class="list">
                        <li class="list-item"><span class="title">优化代码格式</span><span class="footer">2020-06-04 11:28</span></li>
                        <li class="list-item"><span class="title">新增消息组件</span><span class="footer">2020-06-01 04:23</span></li>
                        <li class="list-item"><span class="title">移动端兼容</span><span class="footer">2020-05-22 21:38</span></li>
                        <li class="list-item"><span class="title">系统布局优化</span><span class="footer">2020-05-15 14:26</span></li>
                        <li class="list-item"><span class="title">兼容多系统菜单模式</span><span class="footer">2020-05-13 16:32</span></li>
                        <li class="list-item"><span class="title">兼容多标签页切换</span><span class="footer">2019-12-9 14:58</span></li>
                        <li class="list-item"><span class="title">扩展下拉组件</span><span class="footer">2019-12-7 9:06</span></li>
                        <li class="list-item"><span class="title">扩展卡片样式</span><span class="footer">2019-12-1 10:26</span></li>
                    </ul>
                </div>
            </div>
<!--            <div class="layui-card">-->
<!--                <div class="layui-card-header">-->
<!--                    链接-->
<!--                </div>-->
<!--                <div class="layui-card-body">-->
<!--                    <a target="_blank" href="http://www.laytp.com" class="laytp-btn laytp-btn-primary  layui-btn-fluid" style="margin-top: 8px;height: 50px;line-height: 50px;">官 网</a>-->
<!--                    <br/>-->
<!--                    <a target="_blank" href="https://gitee.com/junstar/laytp" class="laytp-btn laytp-btn-warming  layui-btn-fluid" style="margin-top: 8px;height: 50px;line-height: 50px;">下 载</a>-->
<!--                </div>-->
<!--            </div>-->
        </div>
    </div>
</div>
<script>
    document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
    document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
</script>
<script>
    layui.use(['layer', 'echarts', 'element', 'count'], function() {
        var $ = layui.jquery,
            layer = layui.layer,
            element = layui.element,
            count = layui.count,
            echarts = layui.echarts;
        // count.up("today_order_num", {
        //     time: 4000,
        //     num: $('#today_order_num').text(),
        //     bit: 2,
        //     regulator: 50
        // })
        $('body').show();
        var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
        getDataChart(0);
        function getDataChart(day){
            $.post('{:url("Console/getDataChart")}',{day:day},function(res){
                option = {
                    title: {
                        text: ''
                    },
                    tooltip: {
                        trigger: 'axis'
                    },
                    legend: {
                        data: res.title
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: res.dateArr
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: res.series
                };
                echartsRecords.setOption(option);
            })
        }
        window.onresize = function() {
            echartsRecords.resize();
        }
    });
</script>
</body>
</html>
